package demo.DataStrucAndAlgo.Easy_pritice;

import java.util.Scanner;

/**
 * @Auther: hjy(lc))
 * @Date: 2022/10/16-10-16-11:15
 * @Description：demo.DataStrucAndAlgo.Easy_pritice
 */
public class newCodeTest2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int x = sc.nextInt();
        int sum = 0;
        for (int i = 0; i < n; i++) {
            int tiji = sc.nextInt();
            if(tiji >= x){
                sum = sum + tiji;
            }else if(tiji + k -1 >= x){
                sum = sum + x;
            }
        }
        System.out.println(sum);
    }
}
